.img-pre__container {
	position: fixed;
	left: 0;
	right: 0;
	top: 0;
	bottom: 0;
	width: 100vw;
	height: 100vh;
	font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
	z-index: var(--container-zIndex);
  pointer-events: none;
	display: none;
	.img-pre__header {
		box-sizing: border-box;
		display: flex;
		justify-content: space-between;
		align-items: center;
		height: 55px;
		width: 100%;
		padding: 0 calc(25px + (100vw - 100%)) 0 25px;
		background: rgba(0, 0, 0, var(--header-bg-opcity));
		position: absolute;
		z-index: calc(var(--container-zIndex) + 1);
		.img-pre__nums {
			color: #fff;
		}
		.img-pre__button-item {
			outline: none;
			border: none;
			background: none;
			width: 30px;
			height: 30px;
			border-radius: 4px;
			margin-right: 1.5vw;
			display: inline-flex;
			justify-content: center;
			align-items: center;
			position: relative;
			color: #fff;
			.bi,
			svg {
				font-size: 16px;
				width: 16px;
				height: 16px;
			}
			&:last-child {
				margin-right: 0;
			}
		}

		button:not(:disabled) {
			cursor: pointer;
			&::after {
				content: attr(data-tooltip);
				font-size: 12px;
				position: absolute;
				left: 50%;
				top: 130%;
				transform: translateX(-50%);
				background: rgba(0, 0, 0, 0.9);
				padding: 3px 7px;
				white-space: nowrap;
				border-radius: 4px;
				display: none;
			}
			&:hover::after {
				display: inline-block;
			}
			&:hover {
				background: rgba(0, 0, 0, 0.2);
			}
		}
		button[disabled] {
			opacity: 0.4;
			cursor: not-allowed !important;
		}
	}
	.img-pre__content-wrapper {
		height: 100%;
		position: relative;
		.img-pre__img-item {
			width: 100%;
			height: 100%;
			position: absolute;
			top: 0;
			animation-duration: 0.3s;
			will-change: transform, opacity;
			animation-timing-function: ease-in-out;
			&.slide-left-out {
				animation-name: img-pre_slide-left-hide;
			}
			&.slide-left-in {
				animation-name: img-pre_slide-left-show;
			}
			&.slide-right-out {
				animation-name: img-pre_slide-right-hide;
			}
			&.slide-right-in {
				animation-name: img-pre_slide-right-show;
			}
			&.loading::after {
				content: '';
				display: inline-block;
				width: 40px;
				height: 40px;
				background: url('')
					no-repeat center center / cover;
				position: absolute;
				top: 50%;
				left: 50%;
				transform: translate(-50%, -50%);
			}
		}
		img {
			cursor: pointer;
			position: absolute;
			transition: all 0.5s;
			will-change: transform;
			transform: translateX(var(--offsetX)) translateY(var(--offsetY)) translateZ(0) scale(var(--scale))
				rotate(var(--rotate));
			user-select: none;
		}
	}
	#J-img-pre__prev,
	#J-img-pre__next {
		background: none;
		border: none;
		outline: none;
		position: fixed;
		top: 50%;
		color: #f6f6f6;
		cursor: pointer;
		z-index: calc(var(--container-zIndex) + 1);
		display: flex;
		align-items: center;
		justify-content: center;
		padding: 7px 5px;
		border-radius: 2px;
		.bi {
			font-size: 20px;
			width: 20px;
			height: 20px;
		}
		&:hover {
			background: rgba(0, 0, 0, 0.2);
		}
	}
	#J-img-pre__prev {
		left: 2%;
	}
	#J-img-pre__next {
		right: calc(2% + 100vw - 100%);
	}
	.moving {
		transition: none !important;
	}
	&.show {
		animation-name: img-pre_show;
    pointer-events: auto;
		.img-pre__header {
			animation-name: img-pre_header-show;
		}
	}
	&.hide {
		animation-name: img-pre_hide;
		.img-pre__header {
			animation-name: img-pre_header-hide;
		}
		img.img-pre__animated {
			animation-name: img-pre_header-hide;
		}
	}
}

.img-pre__animated {
	-webkit-animation-duration: 0.5s;
	animation-duration: 0.5s;
	-webkit-animation-fill-mode: both;
	animation-fill-mode: both;
}
@keyframes img-pre_show {
	0% {
		background: rgba(0, 0, 0, 0);
	}
	100% {
		background: rgba(0, 0, 0, var(--container-opacity));
	}
}
@keyframes img-pre_hide {
	0% {
		background: rgba(0, 0, 0, var(--container-opacity));
	}
	100% {
		background: rgba(0, 0, 0, 0);
	}
}
@keyframes img-pre_header-show {
	0% {
		opacity: 0;
	}
	100% {
		opacity: 1;
	}
}
@keyframes img-pre_header-hide {
	0% {
		opacity: 1;
	}
	100% {
		opacity: 0;
	}
}

@keyframes img-pre_slide-left-hide {
	0% {
		transform: translateX(0);
		opacity: 1;
	}
	100% {
		transform: translateX(-90%);
		opacity: 0;
	}
}

@keyframes img-pre_slide-left-show {
	0% {
		transform: translateX(90%);
		opacity: 0;
	}
	100% {
		transform: translateX(0);
		opacity: 1;
	}
}
@keyframes img-pre_slide-right-hide {
	0% {
		transform: translateX(0);
		opacity: 1;
	}
	100% {
		transform: translateX(90%);
		opacity: 0;
	}
}

@keyframes img-pre_slide-right-show {
	0% {
		transform: translateX(-90%);
		opacity: 0;
	}
	100% {
		transform: translateX(0);
		opacity: 1;
	}
}
